package com.chen.service.impl;

import java.util.List;

import javax.annotation.Resource;
import javax.persistence.Column;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.chen.dao.UserDao;
import com.chen.pojo.User;
import com.chen.service.UserService;
@Transactional
@Service
public class UserServiceImpl implements UserService{

	@Resource
	private UserDao userDao;

	@Override
	public List<User> login(User user) {
		System.out.println("userdao login");
		return userDao.login(user);
	}

	@Override
	public void register(User user) {
		userDao.register(user);
	}

	@Override
	public List<User> findAll() {
		return userDao.findAll();
	}

	@Override
	public List<User> edit(int id) {
		
		return userDao.edit(id);
	}

	@Override
	public void upDate(User user) {
		userDao.update(user);
		
	}
}